#include <stdio.h>
#include <stdlib.h>
#include "lab51.h"

void update(struct part inv[], int np) 
{
    int i,number,change;
    printf("Enter part number: ");
    scanf("%d",&number);
    i = find_part(number,inv,np);
    if(i>=0) 
    {
        printf("Enter change in quantity on hand: ");
        scanf("%d",&change);
        inv[i].on_hand+=change;
    }
    else 
        printf("Part not found.\n");
}